package cn.wyl.basic.service;

import cn.wyl.basic.query.BaseQuery;
import cn.wyl.basic.util.PageList;
import org.apache.rocketmq.client.exception.MQClientException;

import java.util.List;

public interface BaseService<T> {
    T loadById(Long id);

    List<T> loadAll();

    void save(T t) throws Exception;

    void update(T t);

    void remove(Long id);

    /**
     * 分页查询
     * @param query
     * @return
     */
    PageList<T> queryPage(BaseQuery query);

    /*
     * 批量刪除
     * */
    void patchDel(List<Long> ids);


}
